\documentclass[10pt]{article}
\usepackage{amsmath}

\newcommand{\problem}[1]{\noindent{\sc Problem #1.}}
\newcommand{\solution}{\noindent{\sc Solution.}}
\newcommand{\complexity}{\noindent{\sc Complexity. }}
\newcommand{\answer}{\noindent{\sc Answer. }}
\newcommand{\given}{\,|\,}

\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}

\begin{document}

\problem{317}
Firecracker.

A firecracker explodes at a height of 100 m above level ground. It breaks into a large number of very small fragments, which move in every direction; all of them have the same initial velocity of 20 m/s.

We assume that the fragments move without air resistance, in a uniform gravitational field with $g=9.81 \text{m}/\text{s}^2$.

Find the volume (in $\text{m}^3$) of the region through which the fragments move before reaching the ground. Give your answer rounded to four decimal places.

\solution

Create coordinates for the problem. Denote the point of explosion as $(0,h)$. Let $v_0$ denote the initial velocity of a fragment. Let $\theta$ be the angle between initial velocity and the x-axis. The parabola of a fragment with respect to time $t$ is
\begin{align}
x &= (v_0 \cos\theta) t \notag \\
y &= h + (v_0 \sin\theta)t - \frac{1}{2} g t^2 \notag
\end{align}
After a little algebra, we can rewrite it as
\[
y = h + (\tan \theta) x - \frac{g}{2 v_0^2} (\tan^2 \theta + 1) x^2
\]

In order to find the volume embraced by all the fragments, for each given $x>0$, we find the maximum $y$ that a fragment can reach. We can then integrate over all possible $x$ to find the volume.

For a given $x$, write $y$ as a function of $\tan \theta$:
\[
y = \left( h - \frac{gx^2}{2 v_0^2} \right)  + x \tan \theta - \frac{gx^2}{2 v_0^2} \tan^2 \theta
\]
Denote $f(x)$ as the maximum value of $y$ of the above equation for all possible choices of $\theta$, and it's easy to find that the maxima occurs when $\tan\theta = v_0^2/(gx)$, and
\[
f(x) = h + \frac{v_0^2}{2g} - \frac{gx^2}{2 v_0^2}
\]
A useful result is that the maximum horizontal distance that a fragment can reach, denoted by $x_m$, can be found by solving $f(x_m) = 0$ to find
\[
x_m = \sqrt{ \frac{2 v_0^2}{g}\left(h+\frac{v_0^2}{2g}\right) }
\]

Now we can find the volume embraced by all the fragments as
\begin{align}
V &= \int_0^{x_m} [ \pi (x+dx)^2 - \pi x^2 ] f(x) \notag \\
&= \int_0^{x_m} 2 \pi x f(x) dx \notag \\
&= \pi \left[ \left(h+\frac{v_0^2}{2g}\right) x_m^2 - \frac{g}{4 v_0^2} x_m^4 \right] \notag \\
&= \pi \left(h+\frac{v_0^2}{2g}\right)^2 \frac{v_0^2}{g} \notag
\end{align}

\answer
1856532.8455

\complexity

Time complexity: $\mathcal{O}(1)$

Space complexity: $\mathcal{O}(1)$

\end{document} 